/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.planeteVelo.backedBean;

import java.io.Serializable;
import java.util.Date;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author apo
 */
@Entity

public class Ticket implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int idTicket;
    @Temporal(TemporalType.DATE)
    private Date date = new Date();
    private double prixTotal;
    private double prixTotalRemise;
    private double cb;
    private double cheque;
    private double espece;
    private double virement;
    private double differe;
    @OneToMany(mappedBy = "Ticket")
    private List<LigneTicket> listeLignes = new ArrayList<>();
    @ManyToOne
    @JoinColumn(name = "FK_Client")
    private Client client = new Client();

    public Ticket() {
    }

    public int getIdTicket() {
        return idTicket;
    }

    public Date getDate() {
        return date;
    }

    public double getPrixTotal() {
        return prixTotal;
    }

    public double getPrixTotalRemise() {
        return prixTotalRemise;
    }

    public double getCb() {
        return cb;
    }

    public double getCheque() {
        return cheque;
    }

    public double getEspece() {
        return espece;
    }

    public double getVirement() {
        return virement;
    }

    public double getDiffere() {
        return differe;
    }

    public List<LigneTicket> getListeLignes() {
        return listeLignes;
    }

    public void setIdTicket(int idTicket) {
        this.idTicket = idTicket;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public void setPrixTotal(double prixTotal) {
        this.prixTotal = prixTotal;
    }

    public void setPrixTotalRemise(double prixTotalRemise) {
        this.prixTotalRemise = prixTotalRemise;
    }

    public void setCb(double cb) {
        this.cb = cb;
    }

    public void setCheque(double cheque) {
        this.cheque = cheque;
    }

    public void setEspece(double espece) {
        this.espece = espece;
    }

    public void setVirement(double virement) {
        this.virement = virement;
    }

    public void setDiffere(double differe) {
        this.differe = differe;
    }

    public void setListeLignes(List<LigneTicket> listeLignes) {
        this.listeLignes = listeLignes;
    }

    public Client getClient() {
        return client;
    }

    public void setClient(Client client) {
        this.client = client;
    }
    
}
